package com.lanyou.cook.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import com.lanyou.cook.entity.kettle.KettleJob;

@RepositoryRestResource(exported=false)
public interface KettleJobRepository
		extends JpaRepository<KettleJob, Long>, JpaSpecificationExecutor<KettleJob>{
	
	@Query(nativeQuery = true,
			value = 
			"SELECT FIELD_JOB_ID,JOB_NAME,JOB_CODE FROM  t_cook_bu_field_job WHERE  JOB_CODE LIKE 'ETL_发布方编码2接收方编码_%'"
			)
	List<Object[]> findForMaxJobCodes();
}
